package learning.spring.contacts.web.controllers;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created with IntelliJ IDEA.
 * User: bibro
 * Date: 22.02.14
 * Time: 10:53
 * To change this template use File | Settings | File Templates.
 */
@Controller
@RequestMapping("/hello")
public class SimpleController {

    final Logger logger = LoggerFactory.getLogger(SimpleController.class);

    @RequestMapping(method=RequestMethod.GET)
    public String test(ModelMap model) {
        logger.info("Simple method");
        return "contacts/list";
    }
}
